# Maintainer: Cowington Post <cowingtonpost@gmail.com>
pkgname=py3-flask-mailman
pkgver=1.1.1
pkgrel=0
pkgdesc="Porting Django's email implementation to your Flask applications"
url="https://waynerv.github.io/flask-mailman/"
arch="noarch"
license="BSD-3-Clause"
depends="py3-flask"
makedepends="py3-gpep517 py3-poetry-core py3-wheel"
checkdepends="py3-pytest py3-aiosmtpd"
subpackages="$pkgname-pyc"
source="https://github.com/waynerv/flask-mailman/archive/v$pkgver/py3-flask-mailman-$pkgver.tar.gz"
builddir="$srcdir/flask-mailman-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
12bd3af87d9cef8186058a5bd3707670cf499856c6f753f2cc1b88bac0e8cd285adee7850cbebd431b3820eb64ef43f443faca0ac06dae34a0bd8d5deb156338  py3-flask-mailman-1.1.1.tar.gz
"
